package com.jiepu.daily.jdbc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * @Description:
 * @author: xinjie
 * @date: 2020/8/24  17:43
 */
public class JdbcDemo2 {
	public static void main(String[] args) throws ClassNotFoundException, SQLException {

		String driverName = "oracle.jdbc.driver.OracleDriver";
		String dburl = "jdbc:oracle:thin:@localhost:1521:orcl";
		String user = "xinjie";
		String password = "yang19990916";

		Class.forName(driverName);
		Connection conn = DriverManager.getConnection(dburl,user,password);
		Statement statement = conn.createStatement();
		String sql = "INSERT INTO T_JDBC VALUES(3,'whm',21,'女')";
		statement.execute(sql);
		System.out.println("xinjie inserted");



	}
}
